@extends('layouts.default')  
@section('content')
<div class="box primary">         
    <header>
        <h5></h5>
        <!-- .toolbar -->
        <div class="toolbar">
            <nav style="padding: 8px;">
                <a href="javascript:;" class="btn btn-default btn-xs collapse-box">
                    <i class="fa fa-minus"></i>
                </a> 
                <a href="javascript:;" class="btn btn-default btn-xs full-box">
                    <i class="fa fa-expand"></i>
                </a> 
                <a href="javascript:;" class="btn btn-danger btn-xs close-box">
                    <i class="fa fa-times"></i>
                </a> 
            </nav>
        </div><!-- /.toolbar -->
    </header>
    <div id="div-1" class="body">   
        @foreach ($values as $v) 
        {{ Form::model($v, array(
                        'route' => array('repairs.update', $v->repairId),
                        'method' => 'PUT',
                        'class'=>'form-horizontal',
                        'id'=>'form-validate')) 
        }}
        <div class="form-group">
            {{ Form::label('repair', Lang::get('messages.repair').'*', array(
                            'class'=>'control-label col-lg-4'))
            }}
            <div class="col-lg-8">
                {{ Form::select('repair', $repairs, isset($v->repair_id) ? $v->repair_id : '', array( 
                                'class' => 'form-control',
                                'id'=>'repair_field',
                                'placeholder' => Lang::get('messages.repair'))) 
                }}             
            </div>
        </div>        
        <div class="row form-group">
            {{ Form::label('price', Lang::get('messages.price').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-4">
                {{ Form::text('price',  isset($v->price) ? $v->price:'', array( 
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.price'))) 
                }}              
            </div>
            <div class="col-lg-4">
                {{ Form::select('currency', $currencies, isset($v->currency) ? $v->currency:'', array( 
                                'class' => 'form-control')) 
                }}                      
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('service', Lang::get('messages.service').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::select('service', $services, isset($v->service_id) ? $v->service_id:'' , array( 
                                'class' => 'form-control')) 
                }}             
            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('repair_date', Lang::get('messages.repair_date').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Helpers\Helper::date('repair_date', isset($v->repair_date) ? $v->repair_date:''  , array(
                                'class' => 'form-control' )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('nr_invoice', Lang::get('messages.nr_invoice').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::text('nr_invoice', isset($v->nr_invoice) ? $v->nr_invoice:'', array( 
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.nr_invoice'))) 
                }}              
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('comment',Lang::get('messages.comment'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8">
                {{ Form::textarea('comment', isset($v->comment) ? $v->comment:'', array(
                                'class' => 'form-control',
                                'placeholder'=>Lang::get('messages.write_comment'))) }}
                <br/>
                <div id="validation-div" class="">
                </div>
            </div>
        </div>
        {{ Form::submit(Lang::get('messages.save_btn'), array('class' => 'btn btn-primary btn-line')) }}
        <input type="button" value="{{Lang::get('messages.cancel_btn')}}" class="btn btn-danger btn-line" onClick="history.go(-1);
                    return true;">
        {{ Form::close() }}
        @endforeach
    </div>
</div> 
@stop
